home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
asmutil
/
coreaids.zip
/
STK_STOP.ASM
< prev
next >
Wrap
Assembly Source File
|
1987-06-25
|
685b
|
31 lines
; DESC: return from the user stack to the system stack V1.00
; SAMPLE: STK_STOP
; ##################################################################
STACK Segment Para Common 'STACK'
DW 100H DUP(0)
STACK Ends
STK_STOC Segment
Assume CS:STK_STOC,SS:STACK
Public STK_STOP
;notice.
DB 'STK_STOP - V1.00, Copyright 1987, CoreTechs ',0DH,0AH
STK_STOP Proc Near
Cli ;stop all interrupts.
Pop CS:WORD PTR[0] ;save return address.
Mov SS,CS:WORD PTR[10] ;restore system stack offsets.
Mov SP,CS:WORD PTR[12]
Push CS:WORD PTR[0] ;replace return address.
Sti ;restore interrupts.
Ret
STK_STOP Endp
STK_STOC Ends
End